// ExcessRecordThread.h: interface for the ExcessRecordThread class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_EXCESSRECORDTHREAD_H__530E8DCC_52AD_412F_9049_4EDD63F41F9A__INCLUDED_)
#define AFX_EXCESSRECORDTHREAD_H__530E8DCC_52AD_412F_9049_4EDD63F41F9A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "CommonLib\Thread.h"
#include "CommonLib\RecordManager.h"

#include "Ado.h"
#include "..\..\\CommonLibs\CommonLib\Log.h"

//class CExcessRecordSet;

class ExcessRecordThread : public Thread
{
public:
	bool InsertReordToDB(ExcessRecord er);
	ExcessRecordThread();
	virtual ~ExcessRecordThread();

	virtual bool InitInstance();
	virtual bool ExitInstance();
	virtual int Run();

	void Cancel() {m_bCancel = true;}

protected:
	bool m_bCancel;

	//CDatabase * pDatabase;
	CAdoConnection *m_adopConnection;
	CAdoRecordSet  m_adoRecordSet;

	CMutex m_mutexRecords;
	CLog *pLog;

	//CExcessRecordSet * m_prsExcessRecord;
};

#endif // !defined(AFX_EXCESSRECORDTHREAD_H__530E8DCC_52AD_412F_9049_4EDD63F41F9A__INCLUDED_)
